import axios from "@/model/axios";
import api from "@/model/api";

export const bannerList = (params) => axios({
    method: "get",
    url: api.movie.banner,
    params
})
export const filmList = (params) => axios({
    method: "get",
    url: api.movie.film,
    params
})
export const filmDetail = (id) => axios({
    method: "get",
    url: api.movie.detail + id,
})
export const filmComments = (params) => axios({
    method: "get",
    url: api.movie.comments,
    params
})
export const commentsLike = (id) => axios({
    method: "post",
    url: api.movie.like + id,
    headers: {
        "Authorization": window.localStorage.getItem("token")
    }
})
export const writeComments = (data) => axios({
    method: "post",
    url: api.movie.write,
    data,
    headers: {
        "Authorization": window.localStorage.getItem("token")
    }
})
export const theatreQuery = (params) => axios({
    method: "get",
    url: api.movie.theatre,
    params
})